#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

enum StackedWidgetPage{
    HomePage, MyselfPage, AdminPage, UploadPage
};

QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    void initUI();

    // 鼠标单击
    void mousePressEvent(QMouseEvent *event);

    // 鼠标移动事件
    void mouseMoveEvent(QMouseEvent *event);

    void connectSignalAndSlot();

    void onSwitchPage(int pageId);

    void onSwitchUI(int pageId);

    void resetswitchBtnInfo(int pageId);
private:
    Ui::Widget *ui;
    QPoint dragPos;
};
#endif // WIDGET_H
